//
//  BHSportRecordTableViewCell.swift
//  BigHealth
//
//  Created by 蔺百好 on 2021/7/15.
//

import UIKit

class BHSportRecordTableViewCell: UITableViewCell {

    @IBOutlet weak var des_backView: UIView!
    
    @IBOutlet weak var time_label: UILabel!
    @IBOutlet weak var info_label: UILabel!
    
    @IBOutlet weak var shareBtn: UIButton!
    
    @IBOutlet weak var planTitle_label: UILabel!
    
    
    var model: BHSportRunOrOtherInfoModel? {
        didSet {
            if model == nil {
                return
            }
            
            self.planTitle_label.text = model?.title
            self.time_label.text = model?.createTime
            if model?.km.isEmpty == true {
                self.info_label.text = "用时\(model?.times ?? "00:00:00")"
            }else {
                self.info_label.text = "\(model?.km ?? "")公里 | 用时\(model?.times ?? "00:00:00")"
            }
        }
    }
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        self.des_backView.addLayerCorner(2, 0, .white)
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
